disable OsPath build flag on windows for now
authorJoey Hess <joeyh@joeyh.name>
Wed, 29 Jan 2025 21:22:21 +0000 (17:22 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 29 Jan 2025 21:22:21 +0000 (17:22 -0400)
Test suite failure looks like this:

        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        fatal: could not open '\\?\C:\Users\appveyor\AppData\Local\Temp\1\hash-cc81b41d-dfda-4ae8-904b-b531742443cc' for reading: No such file or directory
        git-annex: fd:4: Data.ByteString.hGetLine: end of file
        git-annex: user error (git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","hash-object","-w","--no-filters","--stdin-paths"] exited 128)

This is apparently in Git.HashObject, and probably in hashBlob, which uses a
temp file with a name starting with "hash", but I have not been able to tell
what's wrong.

I don't understand where the "\\?" path prefix (windows UNC-style path)
is coming from in the path that gets fed into git hash-file, or why git
hash-file can't open the file.

git-annex.cabal

index b662fe482e70a8158da85d197edf0c962ca50d1f..b610cdf65cf8050e51f0db57540c30155a268973 100644 (file)
@@ -333,12 +333,14 @@ Executable git-annex
       P2P.Http.State
 
   if flag(OsPath)
-    Build-Depends:
-      os-string (>= 2.0.0),
-      directory (>= 1.3.8.3),
-      filepath (>= 1.5.2.0),
-      file-io (>= 0.1.3)
-    CPP-Options: -DWITH_OSPATH
+    -- Currently this build flag does not pass the test suite on Windows
+    if (! os(windows))
+      Build-Depends:
+        os-string (>= 2.0.0),
+        directory (>= 1.3.8.3),
+        filepath (>= 1.5.2.0),
+        file-io (>= 0.1.3)
+      CPP-Options: -DWITH_OSPATH
 
   if (os(windows))
     Build-Depends: